package com.cskaoyan.bean.po.goods;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cskaoyan.util.common.StringUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import net.sf.json.JSONArray;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @Author: 冯子靖
 * @Description:
 * @Date: 2022/7/19 13:32
 */
@Data
@TableName("market_goods_product")
public class AdminGoodsProductsDetailPO {

    private Integer id;

    private String[] specifications;

    private BigDecimal price;

    private Integer number;

    private String url;

    private Integer goodsId;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date addTime;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    private boolean deleted;

    public void setSpecifications(String specifications) {
        this.specifications = StringUtils.splitJsonArrays(specifications);
    }

    public String[] getSpecifications() {
        return specifications;
    }
}
